import 'package:appflutterhomeschool/res/styles.dart';
import 'package:appflutterhomeschool/route/application.dart';
import 'package:appflutterhomeschool/route/routes.dart';
import 'package:appflutterhomeschool/ui/widgets/general_page_jump_widget.dart';
import 'package:appflutterhomeschool/ui/widgets/my_app_bar.dart';
import 'package:appflutterhomeschool/utils/utils.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

///用户： ninetailedfox
///时间： 2020/6/27
///邮箱： 1037438704@qq.com
///功能： 客服/帮助

class CustomerServicePage extends StatelessWidget {
  final List<String> listData = [
    "这里是后台上传的名称",
    "清理这里是后台上传的名称缓存",
    "这里是后台上传的名称",
    "这里是后台上传的名称",
    "这里是后台上传的名称",
    "这里是后台上传的名称",
    "这里是后台上传的名称",
    "这里是后台上传的名称",
    "这里是后台上传的名称",
    "这里是后台上传的名称",
  ];

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: MyAppBar2(title: "客服/帮助"),
      body: Stack(
        children: <Widget>[
          Positioned(
            top: 0,
            left: 0,
            right: 0,
            bottom: ScreenUtil().setWidth(114.78),
            child: ListView.builder(
                shrinkWrap: true,
                itemCount: listData.length,
                itemBuilder: (context, index) {
                  return GeneralPageJumpWidget(
                    title: listData[index],
                    onTap: () {
                      Application().navigatePushToPage(
                          context, Routes.helpDetailsPage, {});
                    },
                  );
                }),
          ),
          Positioned(
            bottom: 0,
            left: 0,
            right: 0,
            child: Container(
                color: Colors.white,
                height: ScreenUtil().setWidth(114.78),
                child: GestureDetector(
                  onTap: () {
                    Application()
                        .navigatePushToPage(context, Routes.leaveWordPage, {});
                  },
                  child: Row(
                    crossAxisAlignment: CrossAxisAlignment.center,
                    mainAxisAlignment: MainAxisAlignment.center,
                    children: <Widget>[
                      Image.asset(Utils.getImgPath("wode_shezhi_kefu")),
                      SizedBox(width: 5),
                      Text("联系客服", style: TextStyles.textDark36),
                    ],
                  ),
                )),
          )
        ],
      ),
    );
  }
}
